<?php include $this->tpl('public:adminHeader.php') ?>
	
	<link rel="stylesheet" href="{__STATIC_URL__}/public/pay/css/??componentTable.css">
	<link rel="stylesheet" href="{__STATIC_URL__}/public/lib/jqueryplug/dateTimePicket/jquery.datetimepicker.css">

<?php include $this->tpl('public:adminPub.php') ?>
	<!-- main -->

	<div class="">

		<!-- search -->

		<form action="/Finance/Cashing" method="get" class="adminUI-form">
			<div class="component-query">
				<div class="input">

					<!-- 1 -->
					<div class="query-input-item">
						<label for="num">商户号：</label>
						<input type="text" placeholder="商户号" data-valid="integer" name='business_id' value='<?=$search['business_id'];?>'>
					</div>
					<!-- 1 -->

					<!-- 2 -->
					<div class="query-input-item">
						<label for="name">商户名称：</label>
						<input type="text" placeholder="商户名称" name='business_name' value='<?=$search['business_name'];?>'>
						</div>	
					<!-- 2 -->

					<!-- 3 -->
					<div class="query-input-item">
						<label for="num">提现单号：</label>
						<input type="text" placeholder="提现单号" data-valid="integer" name='wd_flow_no' value='<?=$search['wd_flow_no'];?>'>
					</div>
					<!-- 3 -->

					<!-- 4 -->
					<div class="query-input-item">
						<label for="trade-time">申请时间：</label>
						<input type="text" placeholder="<?=date('Y-m-d')?>" class="startTime" name='startTime' value='<?=$search['startTime'];?>'>
						<label for="to">到</label>
						<input type="text" placeholder="<?=date('Y-m-d')?>" class="endTime" name='endTime' value='<?=$search['endTime'];?>'>
					</div>
					<!-- 4 -->

					<!-- 3 -->
					<div class="query-input-item">
						<label for="num">状态：</label>
						<select name="status" id="" class="input-format">
							<option value="all" <?=$search['status'] =='all' ? 'selected': ''?>>全部</option>
							<option value="0" <?=$search['status'] =='0' ? 'selected': ''?>>待审核</option>
							<option value="1" <?=$search['status'] =='1' ? 'selected': ''?>>已审核</option>
							<option value="2" <?=$search['status'] =='2' ? 'selected': ''?>>已拒绝</option>
						</select>
					</div>
					<!-- 3 -->

				</div>

				<div class="adminUI-error"></div>

				<!-- button -->
				<div class="cus-mg-b-15">
					<button class="cus-btn cus-btn-md cus-btn-green"><i class="fa fa-search"></i> 查询</button>
				</div>
				<!-- button -->

			</div>
		</form>

		<!-- search -->


		<!-- table -->

		<div class="component-table">
			<table class="pure-table pure-table-horizontal" style="width: 100%;">
				<thead>
					<tr>
						<th width="250">提现单号</th>
						<th>商户名称</th>
						<th>提现金额(元)</th>
						<th>申请时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<?php if(!empty($cashing)):?>
				<?php foreach($cashing as $v):?>
					<tr>
						<td><?=$v['wd_flow_no'];?></td>
						<td><?=$v['business_name'];?></td>
						<td><?=$v['wd_money'];?></td>
						<td><?=date('Y-m-d H:i:s', $v['apply_time']);?></td>
						<?php switch ($v['status']) {
							case 0:
								echo '<td><span class="fail">待审核</span></td>';
								echo '<td><a href="/Finance/CashingAuditing?id='.$v['id'].'" title="">审核</a></td>';
								break;
							case 1:
								echo '<td><span class="success">已审核</span></td>';
								echo '<td><a href="/Finance/CashingDetail?id='.$v['id'].'" title="detail">详情</a></td>';
								break;
							case 2:
								echo '<td><span class="fail">已拒绝</span></td>';
								echo '<td><a href="/Finance/CashingDetail?id='.$v['id'].'" title="detail">详情</a></td>';
								break;
							
							default:
								echo '<td>&nbsp;</td>';
								echo '<td>&nbsp;</td>';
								break;
						}?>
					</tr>
				<?php endforeach;?>
				<?php endif;?>
				</tbody>
			</table>
		</div>
		
		<!-- table -->

			
	</div>
<?=$page_html?>
	<!-- pub -->
	<script type="text/javascript" src="{__STATIC_URL__}/public/lib/jquery.min.js"></script>
	<script type="text/javascript" src="{__STATIC_URL__}/public/pay/js/common.js"></script>
	<!-- pub -->

	<!-- 弹出框 -->
	<link rel="stylesheet" href="{__STATIC_URL__}/public/lib/jqueryplug/artDialog/ui-dialog.css">
	<script type="text/javascript" src="{__STATIC_URL__}/public/lib/jqueryplug/artDialog/dialog-min.js"></script>
	<!-- 弹出框 -->
	
	<!-- 时间 -->
	<script type="text/javascript" src="{__STATIC_URL__}/public/lib/jqueryplug/dateTimePicket/jquery.datetimepicker.js"></script>
	<script type="text/javascript" src="{__STATIC_URL__}/public/pay/js/dateTime.js"></script>
	<!-- 时间 -->
	
	<!-- main -->

<?php include $this->tpl('public:adminFooter.php') ?>